<template>
	<view class="submitSuccessfully">
		<view class="top">
			<image :src="obtainImgUrl('icon/icon42.png')" mode="widthFix"></image>
			<text v-if="type=='pickup_order'">提货申请成功</text>
			<text v-if="type=='pay_order'">支付成功</text>
			<text v-if="type=='create_order'">提交订单成功，但未支付</text>
			<text v-if="type=='create_order' || type=='pay_order' || type=='pickup_order'">可在“我的订单”中查看</text>
		</view>
		<view class="bot">
			<text class="bot_txt" v-if="type=='create_order' || type=='pay_order'" @click="jump('store')">返回商城页面</text>
			<text class="bot_txt" v-if="type=='pickup_order'" @click="jump('pickup')">继续提货</text>
			<text class="bot_txt" v-if="type=='create_order' || type=='pay_order' || type=='pickup_order'" @click="jump('order_view', id)">查看订单详情</text>
		</view>
		
		
	</view>
</template>

<script>
	import serve from '../../static/request.js';
	import common from '../../static/jump.js';
	export default {
		data() {
			return {
				type: '',
				id : 0,
			}
		},
		methods: {
            addTempSetting(sceneId, tempId, status) {
            	if(status == undefined) {
            		return ;
            	}
            	serve.request({
            		url: '/member/main/add-temp-setting',
            		data: {
            			tempType: 'wechat',
            			sceneId: sceneId,
            			tempId: tempId,
            			status: status
            		}
            	}).then(res => {
            		console.info(res);
            	});
            },
			obtainImgUrl(imgUrl) {
				return serve.imgUrl()+imgUrl;
			},
			jump(jump_type, jump_link) {
				common.jump(jump_type, jump_link);
			}
		},
		onLoad(options) {
			this.type = options.type || 'club';
			this.id = options.id || 0;
			console.info(this.type);
			console.info(this.id);
		},
		onPullDownRefresh() {
			console.log('refresh');
			setTimeout(function() {
				uni.stopPullDownRefresh(); //结束下拉加载状态
			}, 1000);
		}
	}
</script>

<style scoped lang="scss">
	.submitSuccessfully {
		padding-bottom: 140upx;
		
		.top{
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;
			font-size: 32upx;
			color:rgba(60,72,104,0.8);
			line-height:48upx;
			image{
				width:200upx;
				height:177upx;
				margin: 30upx 0upx;
			}
		}
		.bot{
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;
			padding-top: 170upx;
			.bot_txt{
				width:480upx;
				height:100upx;
				border:1upx solid rgba(255,200,10,1);
				border-radius:50upx;
				font-size:32upx;
				color:rgba(255,200,10,1);
				line-height: 100upx;
				text-align: center;
			}
			.bot_txt:last-child{
				border:1upx solid rgba(60,72,104,0.5);
				color:rgba(60,72,104,0.5);
				margin-top: 74upx;
			}
		}
	}
</style>
